import cv2
import numpy as np

img1 = cv2.imread('4/cat_left_part.png')
img2 = cv2.imread('4/cat_right_part.png')

img1 = cv2.resize(img1, (300, 300))
img2 = cv2.resize(img2, (300, 300))

# 保证两个图像高度一致
mask = np.ones((300, 600, 3), dtype=np.uint8) * 255
mask[0:300, 0:300] = img1
mask[0:300, 300:600] = img2

cv2.imshow('Mask', mask)
cv2.waitKey(0)
cv2.destroyAllWindows()
